/* eslint-disable */
import Vue from "vue";
import VueRouter from "vue-router";
import Home from '../views/Home.vue';
import Layout from '../views/Layout.vue';
import MircoAppDemo from '../views/MircoAppDemo.vue';
import VideoDemo from '../views/VideoDemo.vue';
import En from '../views/En.vue';
import Fu from '../views/Fu.vue';
import Drag from '../views/Drag.vue';
import Post from '../views/Post.vue';
import For from '../views/For.vue';
import BigScreen from '../views/BigScreen.vue';
Vue.use(VueRouter);

const routes = [
    {
        path: '/screen',
        name: 'screen',
        component: BigScreen
    },
    {
        path: '/',
        name: 'Layout',
        component: Layout,
        redirect: '/for',
        children: [
            // {
            //     path: '/',
            //     name: 'for',
            //     component: For
            // },
            {
                path: '/for',
                name: 'for',
                component: For
            },
            {
                path: '/fu',
                name: 'fu',
                component: Fu
            },
            {
                path: '/drag',
                name: 'darg',
                component: Drag
            },
            {
                path: '/i18n',
                name: 'i18n',
                component: En
            },
            {
                path: '/post',
                name: 'post',
                component: Post
            },
            {
                path: '/video',
                name: 'video',
                component: VideoDemo
            },
            {
                // 👇 非严格匹配，/mirco/* 都指向 MircoAppDemo 页面
                path: '/mirco',
                name: 'mirco',
                component: MircoAppDemo
            },
            {
                path: '/pdf',
                name: 'PdfPages',
                // route level code-splitting
                // this generates a separate chunk (about.[hash].js) for this route
                // which is lazy-loaded when the route is visited.
                component: () => import(/* webpackChunkName: "about" */ '../views/PdfPages.vue')
            },
            {
                path: '/about',
                name: 'About',
                // route level code-splitting
                // this generates a separate chunk (about.[hash].js) for this route
                // which is lazy-loaded when the route is visited.
                component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
            },
            {
                path: '/shopping',
                name: 'Shopping',
                // route level code-splitting
                // this generates a separate chunk (about.[hash].js) for this route
                // which is lazy-loaded when the route is visited.
                component: () => import(/* webpackChunkName: "shopping" */ '../views/Shopping.vue')
            }
        ]
    }
];

const router = new VueRouter({
    mode: "history",
    base: process.env.BASE_URL,
    routes,
});

export default router;
